<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed.');
    class Guest_m extends CI_Model {
        function get_pics(){
            return $this->db->get("invitation_design");
        }
        
        function save_design_path($path,$typeid){
            $this->db->set("design_path", $path);
            $this->db->set("type_id", $typeid);
            $this->db->insert("invitation_design");
        }
        
        function get_guests($id){
            $this->db->where("event_id",$id);
            $query = $this->db->get("guest");
            return $query->result_array();
        }
        
        function get_email($id){
            //$this->db->where('sent','no');
            $this->db->where("event_id",$id);
            return $this->db->get('guest');
        }
        
        function insert_guest_details($data){
            return $this->db->insert('guest',$data); 
        }
    }